/**
 * 
 */
package mdb.com.vn.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;






import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;



/**
 * @author tu.dod
 *
 */
@Entity
@Table(name="IFTB_FIXED_DEPOSIT")
@NamedQueries({
	@NamedQuery(name = "FixedDeposits.findByPersionalType", query = "SELECT c FROM FixedDeposits c WHERE c.customerType = :customerType"),
	@NamedQuery(name = "FixedDeposits.findByCorporateType", query = "SELECT c FROM FixedDeposits c WHERE c.customerType = :customerType"),
	@NamedQuery(name = "FixedDeposits.findByCode", query = "SELECT c FROM FixedDeposits c WHERE c.savingbookNo = :savingbookNo"),
	@NamedQuery(name = "FixedDeposits.getAllFixedDeposits", query = "SELECT c FROM FixedDeposits c"),
	@NamedQuery(name = "FixedDeposits.countThanksCard", query = "SELECT sum(c.checkGetThankSC) FROM FixedDeposits c"),
	@NamedQuery(name = "FixedDeposits.sumAmount", query = "SELECT sum(c.amount) FROM FixedDeposits c"),
	@NamedQuery(name = "FixedDeposits.findByCustomerRef", query = "SELECT c FROM FixedDeposits c WHERE c.customerId = :customerId")
})
public class FixedDeposits extends BasePojo implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "GSEQ_FD")
	@SequenceGenerator(name = "GSEQ_FD", sequenceName = "SEQ_FD")
	private long id;

	@Column(name="ADDRESS")
	private String address;

	@Column(name="AMOUNT")
	private BigDecimal amount;


	@Column(name="END_DATE")
	private Date endDate;

	@Column(name="INTEREST_RATE")
	private double interestRate;

	@Column(name="SAVINGBOOK_NO")
	private String savingbookNo;

	

	@Column(name="START_DATE")
	private Date startDate;

	@Column(name="TERM")
	private String term;
	
	@Column(name="PRODUCT_CODE")
	private String productCode;
	
	
	

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public BigDecimal getAmount() {
		
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public Date getEndDate() {
		return 	endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public double getInterestRate() {
		return interestRate;
	}

	public void setInterestRate(double interestRate) {
		this.interestRate = interestRate;
	}

	public String getSavingbookNo() {
		return savingbookNo;
	}

	public void setSavingbookNo(String savingbookNo) {
		this.savingbookNo = savingbookNo;
	}

	public Date getStartDate() {
	
		return 	startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public String getTerm() {
		return term;
	}

	public void setTerm(String term) {
		this.term = term;
	}

	public String getProductCode() {
		return productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}
	
	
}
